1. Technical Field
The present invention relates in general to the field of data processing systems. More particularly, the present invention relates to memory management within data processing systems. Still more particularly, the present invention relates to a system and method of allocating memory in data processing systems.
2. Description of the Related Art
Virtually all modern data processing systems utilize a virtual memory system to address memory space that greatly exceeds the size of actual, physical system memory. This virtual memory system frequently includes several levels of memory media, with smaller capacity, faster access memory units (e.g., caches, random-access memory) for storing recently-accessed data and larger capacity, slower access memory units (e.g., hard disk drives or other high-capacity storage units) that are only accessed when requested data is not found in the smaller-capacity memory units. Also, the virtual memory system typically includes a central memory controller for coordinating the transfer of data and instructions between the several levels of memory media. In this manner, the virtual memory system simulates a single, very large-capacity memory unit within the data processing system.
Processors access system memory via effective addresses that are later translated into physical addresses that reveal the actual, physical location of requested data or instructions. Because of the different levels of memory media, data or instructions located at contiguous effective addresses may not necessarily be located at contiguous physical addresses. For example, a first element of data may be located in the processor cache hierarchy because the first element was recently accessed by the processor. The second element of data may be located on the hard disk drive. Therefore, if the processor requires both elements for processing of a current task, the processor must wait for the central memory controller to retrieve the second element from the hard disk drive before processing of the current task can continue.
However, some data processing system components require the utilization of contiguous physical (also known as “real”) memory regions. Components that require contiguous physical memory regions for operation are typically performance-oriented. The performance of such components would be compromised if the component would be required to halt operation during retrieval of necessary data from various levels of the virtual memory systems hierarchy. An example of such performance-oriented components are high-speed communication interconnect switches, which maintain control data in contiguous real memory regions.
Other reasons for maintaining contiguous real memory regions include system components that share large regions of memory for communication. For example, an operating system may share memory regions with system firmware. System firmware, unlike the operating system, cannot access memory via the virtual memory system.
A method well-known in the art for maintaining contiguous real memory regions involves reserving a static contiguous real memory region at system start up. However, there are many significant drawbacks to this prior art solution. First, the contiguous memory region must be statically sized at some default value or set by a system administrator based upon projected contiguous real memory usage requirements. The default value may not be appropriate for a particular system environment, which requires the system administrator to manually set a new value for the contiguous real memory region size. Also, since contiguous real memory region requirements vary over time, system administrators tend to conservatively oversize the allocated contiguous real memory region, which results in wasted system memory resources.
Another disadvantage to the prior art method is that since the contiguous real memory region is statically reserved from system memory, it is not available for general memory utilization. For example, if the current task consumes all available system memory earmarked for general utilization, any addition memory requirements cannot be satisfied from the contiguous real memory region, even if free memory is available within the contiguous real memory region.
Still another disadvantage to the prior art method is that any change in the size of the contiguous real memory region requires a system reboot. This results in interruption of the services provided by the data processing system.
Accordingly, there is a need for a system and method of dynamically allocating contiguous real memory regions.